
package ch.hearc.meteo.imp.afficheur.real.vue;

import java.awt.BorderLayout;

import javax.swing.JPanel;

import ch.hearc.meteo.imp.afficheur.real.JFrameStationMeteo;
import ch.hearc.meteo.imp.afficheur.real.vue.atome.JPanelStationMeteoListElement;

public class JPanelLeft extends JPanel
	{

	/*------------------------------------------------------------------*\
	|*							Constructeurs							*|
	\*------------------------------------------------------------------*/

	public JPanelLeft()
		{
		geometry();
		control();
		apparence();
		}

	/*------------------------------------------------------------------*\
	|*							Methodes Public							*|
	\*------------------------------------------------------------------*/
	public void addStationMeteo(JPanelStationMeteoListElement panelStationMeteoListElement)
		{
		panelListeStationMeteo.addStationMeteo(panelStationMeteoListElement);
		panelStationMeteoListElement.setEnabled(JFrameStationMeteo.getInstance().getPanelInformationsMeteo().getPanelControl().isControlEnabled());
		panelListeStationMeteoFilter.updateMeteoStationList();
		}

	public void removeStationMeteo(JPanelStationMeteoListElement panelStationMeteoListElement)
		{
		panelListeStationMeteo.removeStationMeteo(panelStationMeteoListElement);
		panelListeStationMeteoFilter.updateMeteoStationList();
		}

	public void removeAllStationsMeteo()
		{
		panelListeStationMeteo.removeAllStationsMeteo();
		}


	/*------------------------------*\
	|*				Set				*|
	\*------------------------------*/
	@Override
	public void setEnabled(boolean b)
		{
		super.setEnabled(b);
		this.panelListeStationMeteo.setEnabled(b);
		}

	/*------------------------------*\
	|*				Get				*|
	\*------------------------------*/

	/*------------------------------------------------------------------*\
	|*							Methodes Private						*|
	\*------------------------------------------------------------------*/

	private void geometry()
		{
		this.setLayout(new BorderLayout());
		panelListeStationMeteo = new JPanelListeStationMeteo();
		panelListeStationMeteoFilter = new JPanelListeStationMeteoFilter(panelListeStationMeteo);
		this.add(panelListeStationMeteoFilter, BorderLayout.NORTH);
		this.add(panelListeStationMeteo, BorderLayout.CENTER);

		}

	private void control()
		{

		}

	private void apparence()
		{

		}

	/*------------------------------------------------------------------*\
	|*							Attributs Private						*|
	\*------------------------------------------------------------------*/

	private JPanelListeStationMeteo panelListeStationMeteo;
	private JPanelListeStationMeteoFilter panelListeStationMeteoFilter;

	}
